{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "occupied-raise",
   "metadata": {},
   "source": [
    "# Action 2: 信用卡欺诈分析\n",
    "\n",
    "信用卡欺诈分析：     数据集：2013年9月份两天时间内的信用卡交易数据     284807笔交易，492笔欺诈行为     https://www.kaggle.com/mlg-ulb/creditcardfraud     数据样本包括了28个特征V1，V2，……V28，以及交易时间Time和交易金额Amount     因为数据隐私，28个特征值是通过PCA变换得到的结果。     需要预测 每笔交易的分类Class，该笔交易是否为欺诈     Class=0为正常（非欺诈），Class=1代表欺诈"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "dress-manchester",
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "plt.rcParams['font.sans-serif'] = ['SimHei']  # 用来正常显示中文标签\n",
    "plt.rcParams['axes.unicode_minus'] = False  # 用来正常显示负号\n",
    "import numpy as np\n",
    "import itertools\n",
    "from sklearn.linear_model import LogisticRegression\n",
    "from sklearn.metrics import confusion_matrix, precision_recall_curve\n",
    "import pandas as pd\n",
    "from sklearn.preprocessing import StandardScaler\n",
    "from sklearn.model_selection import train_test_split"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "romantic-involvement",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Time</th>\n",
       "      <th>V1</th>\n",
       "      <th>V2</th>\n",
       "      <th>V3</th>\n",
       "      <th>V4</th>\n",
       "      <th>V5</th>\n",
       "      <th>V6</th>\n",
       "      <th>V7</th>\n",
       "      <th>V8</th>\n",
       "      <th>V9</th>\n",
       "      <th>...</th>\n",
       "      <th>V21</th>\n",
       "      <th>V22</th>\n",
       "      <th>V23</th>\n",
       "      <th>V24</th>\n",
       "      <th>V25</th>\n",
       "      <th>V26</th>\n",
       "      <th>V27</th>\n",
       "      <th>V28</th>\n",
       "      <th>Amount</th>\n",
       "      <th>Class</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>284807.000000</td>\n",
       "      <td>2.848070e+05</td>\n",
       "      <td>2.848070e+05</td>\n",
       "      <td>2.848070e+05</td>\n",
       "      <td>2.848070e+05</td>\n",
       "      <td>2.848070e+05</td>\n",
       "      <td>2.848070e+05</td>\n",
       "      <td>2.848070e+05</td>\n",
       "      <td>2.848070e+05</td>\n",
       "      <td>2.848070e+05</td>\n",
       "      <td>...</td>\n",
       "      <td>2.848070e+05</td>\n",
       "      <td>2.848070e+05</td>\n",
       "      <td>2.848070e+05</td>\n",
       "      <td>2.848070e+05</td>\n",
       "      <td>2.848070e+05</td>\n",
       "      <td>2.848070e+05</td>\n",
       "      <td>2.848070e+05</td>\n",
       "      <td>2.848070e+05</td>\n",
       "      <td>284807.000000</td>\n",
       "      <td>284807.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>94813.859575</td>\n",
       "      <td>1.165980e-15</td>\n",
       "      <td>3.416908e-16</td>\n",
       "      <td>-1.373150e-15</td>\n",
       "      <td>2.086869e-15</td>\n",
       "      <td>9.604066e-16</td>\n",
       "      <td>1.490107e-15</td>\n",
       "      <td>-5.556467e-16</td>\n",
       "      <td>1.177556e-16</td>\n",
       "      <td>-2.406455e-15</td>\n",
       "      <td>...</td>\n",
       "      <td>1.656562e-16</td>\n",
       "      <td>-3.444850e-16</td>\n",
       "      <td>2.578648e-16</td>\n",
       "      <td>4.471968e-15</td>\n",
       "      <td>5.340915e-16</td>\n",
       "      <td>1.687098e-15</td>\n",
       "      <td>-3.666453e-16</td>\n",
       "      <td>-1.220404e-16</td>\n",
       "      <td>88.349619</td>\n",
       "      <td>0.001727</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>47488.145955</td>\n",
       "      <td>1.958696e+00</td>\n",
       "      <td>1.651309e+00</td>\n",
       "      <td>1.516255e+00</td>\n",
       "      <td>1.415869e+00</td>\n",
       "      <td>1.380247e+00</td>\n",
       "      <td>1.332271e+00</td>\n",
       "      <td>1.237094e+00</td>\n",
       "      <td>1.194353e+00</td>\n",
       "      <td>1.098632e+00</td>\n",
       "      <td>...</td>\n",
       "      <td>7.345240e-01</td>\n",
       "      <td>7.257016e-01</td>\n",
       "      <td>6.244603e-01</td>\n",
       "      <td>6.056471e-01</td>\n",
       "      <td>5.212781e-01</td>\n",
       "      <td>4.822270e-01</td>\n",
       "      <td>4.036325e-01</td>\n",
       "      <td>3.300833e-01</td>\n",
       "      <td>250.120109</td>\n",
       "      <td>0.041527</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>-5.640751e+01</td>\n",
       "      <td>-7.271573e+01</td>\n",
       "      <td>-4.832559e+01</td>\n",
       "      <td>-5.683171e+00</td>\n",
       "      <td>-1.137433e+02</td>\n",
       "      <td>-2.616051e+01</td>\n",
       "      <td>-4.355724e+01</td>\n",
       "      <td>-7.321672e+01</td>\n",
       "      <td>-1.343407e+01</td>\n",
       "      <td>...</td>\n",
       "      <td>-3.483038e+01</td>\n",
       "      <td>-1.093314e+01</td>\n",
       "      <td>-4.480774e+01</td>\n",
       "      <td>-2.836627e+00</td>\n",
       "      <td>-1.029540e+01</td>\n",
       "      <td>-2.604551e+00</td>\n",
       "      <td>-2.256568e+01</td>\n",
       "      <td>-1.543008e+01</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>54201.500000</td>\n",
       "      <td>-9.203734e-01</td>\n",
       "      <td>-5.985499e-01</td>\n",
       "      <td>-8.903648e-01</td>\n",
       "      <td>-8.486401e-01</td>\n",
       "      <td>-6.915971e-01</td>\n",
       "      <td>-7.682956e-01</td>\n",
       "      <td>-5.540759e-01</td>\n",
       "      <td>-2.086297e-01</td>\n",
       "      <td>-6.430976e-01</td>\n",
       "      <td>...</td>\n",
       "      <td>-2.283949e-01</td>\n",
       "      <td>-5.423504e-01</td>\n",
       "      <td>-1.618463e-01</td>\n",
       "      <td>-3.545861e-01</td>\n",
       "      <td>-3.171451e-01</td>\n",
       "      <td>-3.269839e-01</td>\n",
       "      <td>-7.083953e-02</td>\n",
       "      <td>-5.295979e-02</td>\n",
       "      <td>5.600000</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>84692.000000</td>\n",
       "      <td>1.810880e-02</td>\n",
       "      <td>6.548556e-02</td>\n",
       "      <td>1.798463e-01</td>\n",
       "      <td>-1.984653e-02</td>\n",
       "      <td>-5.433583e-02</td>\n",
       "      <td>-2.741871e-01</td>\n",
       "      <td>4.010308e-02</td>\n",
       "      <td>2.235804e-02</td>\n",
       "      <td>-5.142873e-02</td>\n",
       "      <td>...</td>\n",
       "      <td>-2.945017e-02</td>\n",
       "      <td>6.781943e-03</td>\n",
       "      <td>-1.119293e-02</td>\n",
       "      <td>4.097606e-02</td>\n",
       "      <td>1.659350e-02</td>\n",
       "      <td>-5.213911e-02</td>\n",
       "      <td>1.342146e-03</td>\n",
       "      <td>1.124383e-02</td>\n",
       "      <td>22.000000</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>139320.500000</td>\n",
       "      <td>1.315642e+00</td>\n",
       "      <td>8.037239e-01</td>\n",
       "      <td>1.027196e+00</td>\n",
       "      <td>7.433413e-01</td>\n",
       "      <td>6.119264e-01</td>\n",
       "      <td>3.985649e-01</td>\n",
       "      <td>5.704361e-01</td>\n",
       "      <td>3.273459e-01</td>\n",
       "      <td>5.971390e-01</td>\n",
       "      <td>...</td>\n",
       "      <td>1.863772e-01</td>\n",
       "      <td>5.285536e-01</td>\n",
       "      <td>1.476421e-01</td>\n",
       "      <td>4.395266e-01</td>\n",
       "      <td>3.507156e-01</td>\n",
       "      <td>2.409522e-01</td>\n",
       "      <td>9.104512e-02</td>\n",
       "      <td>7.827995e-02</td>\n",
       "      <td>77.165000</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>172792.000000</td>\n",
       "      <td>2.454930e+00</td>\n",
       "      <td>2.205773e+01</td>\n",
       "      <td>9.382558e+00</td>\n",
       "      <td>1.687534e+01</td>\n",
       "      <td>3.480167e+01</td>\n",
       "      <td>7.330163e+01</td>\n",
       "      <td>1.205895e+02</td>\n",
       "      <td>2.000721e+01</td>\n",
       "      <td>1.559499e+01</td>\n",
       "      <td>...</td>\n",
       "      <td>2.720284e+01</td>\n",
       "      <td>1.050309e+01</td>\n",
       "      <td>2.252841e+01</td>\n",
       "      <td>4.584549e+00</td>\n",
       "      <td>7.519589e+00</td>\n",
       "      <td>3.517346e+00</td>\n",
       "      <td>3.161220e+01</td>\n",
       "      <td>3.384781e+01</td>\n",
       "      <td>25691.160000</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>8 rows × 31 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                Time            V1            V2            V3            V4  \\\n",
       "count  284807.000000  2.848070e+05  2.848070e+05  2.848070e+05  2.848070e+05   \n",
       "mean    94813.859575  1.165980e-15  3.416908e-16 -1.373150e-15  2.086869e-15   \n",
       "std     47488.145955  1.958696e+00  1.651309e+00  1.516255e+00  1.415869e+00   \n",
       "min         0.000000 -5.640751e+01 -7.271573e+01 -4.832559e+01 -5.683171e+00   \n",
       "25%     54201.500000 -9.203734e-01 -5.985499e-01 -8.903648e-01 -8.486401e-01   \n",
       "50%     84692.000000  1.810880e-02  6.548556e-02  1.798463e-01 -1.984653e-02   \n",
       "75%    139320.500000  1.315642e+00  8.037239e-01  1.027196e+00  7.433413e-01   \n",
       "max    172792.000000  2.454930e+00  2.205773e+01  9.382558e+00  1.687534e+01   \n",
       "\n",
       "                 V5            V6            V7            V8            V9  \\\n",
       "count  2.848070e+05  2.848070e+05  2.848070e+05  2.848070e+05  2.848070e+05   \n",
       "mean   9.604066e-16  1.490107e-15 -5.556467e-16  1.177556e-16 -2.406455e-15   \n",
       "std    1.380247e+00  1.332271e+00  1.237094e+00  1.194353e+00  1.098632e+00   \n",
       "min   -1.137433e+02 -2.616051e+01 -4.355724e+01 -7.321672e+01 -1.343407e+01   \n",
       "25%   -6.915971e-01 -7.682956e-01 -5.540759e-01 -2.086297e-01 -6.430976e-01   \n",
       "50%   -5.433583e-02 -2.741871e-01  4.010308e-02  2.235804e-02 -5.142873e-02   \n",
       "75%    6.119264e-01  3.985649e-01  5.704361e-01  3.273459e-01  5.971390e-01   \n",
       "max    3.480167e+01  7.330163e+01  1.205895e+02  2.000721e+01  1.559499e+01   \n",
       "\n",
       "       ...           V21           V22           V23           V24  \\\n",
       "count  ...  2.848070e+05  2.848070e+05  2.848070e+05  2.848070e+05   \n",
       "mean   ...  1.656562e-16 -3.444850e-16  2.578648e-16  4.471968e-15   \n",
       "std    ...  7.345240e-01  7.257016e-01  6.244603e-01  6.056471e-01   \n",
       "min    ... -3.483038e+01 -1.093314e+01 -4.480774e+01 -2.836627e+00   \n",
       "25%    ... -2.283949e-01 -5.423504e-01 -1.618463e-01 -3.545861e-01   \n",
       "50%    ... -2.945017e-02  6.781943e-03 -1.119293e-02  4.097606e-02   \n",
       "75%    ...  1.863772e-01  5.285536e-01  1.476421e-01  4.395266e-01   \n",
       "max    ...  2.720284e+01  1.050309e+01  2.252841e+01  4.584549e+00   \n",
       "\n",
       "                V25           V26           V27           V28         Amount  \\\n",
       "count  2.848070e+05  2.848070e+05  2.848070e+05  2.848070e+05  284807.000000   \n",
       "mean   5.340915e-16  1.687098e-15 -3.666453e-16 -1.220404e-16      88.349619   \n",
       "std    5.212781e-01  4.822270e-01  4.036325e-01  3.300833e-01     250.120109   \n",
       "min   -1.029540e+01 -2.604551e+00 -2.256568e+01 -1.543008e+01       0.000000   \n",
       "25%   -3.171451e-01 -3.269839e-01 -7.083953e-02 -5.295979e-02       5.600000   \n",
       "50%    1.659350e-02 -5.213911e-02  1.342146e-03  1.124383e-02      22.000000   \n",
       "75%    3.507156e-01  2.409522e-01  9.104512e-02  7.827995e-02      77.165000   \n",
       "max    7.519589e+00  3.517346e+00  3.161220e+01  3.384781e+01   25691.160000   \n",
       "\n",
       "               Class  \n",
       "count  284807.000000  \n",
       "mean        0.001727  \n",
       "std         0.041527  \n",
       "min         0.000000  \n",
       "25%         0.000000  \n",
       "50%         0.000000  \n",
       "75%         0.000000  \n",
       "max         1.000000  \n",
       "\n",
       "[8 rows x 31 columns]"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 数据加载\n",
    "data = pd.read_csv('creditcard.csv')\n",
    "data.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "certain-things",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 显示误差矩阵\n",
    "def plot_confusion_matrix(cm, classes, normalize = False, title = 'Confusion matrix\"', cmap = plt.cm.Blues) :\n",
    "    plt.figure()\n",
    "    plt.imshow(cm, interpolation = 'nearest', cmap = cmap)\n",
    "    plt.title(title)\n",
    "    plt.colorbar()\n",
    "    tick_marks = np.arange(len(classes))\n",
    "    plt.xticks(tick_marks, classes, rotation = 0)\n",
    "    plt.yticks(tick_marks, classes)\n",
    "    thresh = cm.max() / 2.\n",
    "    for i, j in itertools.product(range(cm.shape[0]), range(cm.shape[1])) :\n",
    "        plt.text(j, i, cm[i, j],\n",
    "                 horizontalalignment = 'center',\n",
    "                 color = 'white' if cm[i, j] > thresh else 'black')\n",
    "    plt.tight_layout()\n",
    "    plt.ylabel('True label')\n",
    "    plt.xlabel('Predicted label')\n",
    "    plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "average-reporter",
   "metadata": {},
   "outputs": [],
   "source": [
    "# precision-recall curve\n",
    "def plot_precision_recall():\n",
    "    plt.step(recall, precision, color = 'b', alpha = 0.2, where = 'post')\n",
    "    plt.fill_between(recall, precision, step ='post', alpha = 0.2, color = 'b')\n",
    "    plt.plot(recall, precision, linewidth=2)\n",
    "    plt.xlim([0.0,1])\n",
    "    plt.ylim([0.0,1.05])\n",
    "    plt.xlabel('召回率')\n",
    "    plt.ylabel('准确率')\n",
    "    plt.title('准确率-召回率 曲线')\n",
    "    plt.show();"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "educational-renaissance",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "               V1         V2        V3        V4        V5        V6  \\\n",
      "0       -1.359807  -0.072781  2.536347  1.378155 -0.338321  0.462388   \n",
      "1        1.191857   0.266151  0.166480  0.448154  0.060018 -0.082361   \n",
      "2       -1.358354  -1.340163  1.773209  0.379780 -0.503198  1.800499   \n",
      "3       -0.966272  -0.185226  1.792993 -0.863291 -0.010309  1.247203   \n",
      "4       -1.158233   0.877737  1.548718  0.403034 -0.407193  0.095921   \n",
      "...           ...        ...       ...       ...       ...       ...   \n",
      "284802 -11.881118  10.071785 -9.834783 -2.066656 -5.364473 -2.606837   \n",
      "284803  -0.732789  -0.055080  2.035030 -0.738589  0.868229  1.058415   \n",
      "284804   1.919565  -0.301254 -3.249640 -0.557828  2.630515  3.031260   \n",
      "284805  -0.240440   0.530483  0.702510  0.689799 -0.377961  0.623708   \n",
      "284806  -0.533413  -0.189733  0.703337 -0.506271 -0.012546 -0.649617   \n",
      "\n",
      "              V7        V8        V9       V10  ...       V20       V21  \\\n",
      "0       0.239599  0.098698  0.363787  0.090794  ...  0.251412 -0.018307   \n",
      "1      -0.078803  0.085102 -0.255425 -0.166974  ... -0.069083 -0.225775   \n",
      "2       0.791461  0.247676 -1.514654  0.207643  ...  0.524980  0.247998   \n",
      "3       0.237609  0.377436 -1.387024 -0.054952  ... -0.208038 -0.108300   \n",
      "4       0.592941 -0.270533  0.817739  0.753074  ...  0.408542 -0.009431   \n",
      "...          ...       ...       ...       ...  ...       ...       ...   \n",
      "284802 -4.918215  7.305334  1.914428  4.356170  ...  1.475829  0.213454   \n",
      "284803  0.024330  0.294869  0.584800 -0.975926  ...  0.059616  0.214205   \n",
      "284804 -0.296827  0.708417  0.432454 -0.484782  ...  0.001396  0.232045   \n",
      "284805 -0.686180  0.679145  0.392087 -0.399126  ...  0.127434  0.265245   \n",
      "284806  1.577006 -0.414650  0.486180 -0.915427  ...  0.382948  0.261057   \n",
      "\n",
      "             V22       V23       V24       V25       V26       V27       V28  \\\n",
      "0       0.277838 -0.110474  0.066928  0.128539 -0.189115  0.133558 -0.021053   \n",
      "1      -0.638672  0.101288 -0.339846  0.167170  0.125895 -0.008983  0.014724   \n",
      "2       0.771679  0.909412 -0.689281 -0.327642 -0.139097 -0.055353 -0.059752   \n",
      "3       0.005274 -0.190321 -1.175575  0.647376 -0.221929  0.062723  0.061458   \n",
      "4       0.798278 -0.137458  0.141267 -0.206010  0.502292  0.219422  0.215153   \n",
      "...          ...       ...       ...       ...       ...       ...       ...   \n",
      "284802  0.111864  1.014480 -0.509348  1.436807  0.250034  0.943651  0.823731   \n",
      "284803  0.924384  0.012463 -1.016226 -0.606624 -0.395255  0.068472 -0.053527   \n",
      "284804  0.578229 -0.037501  0.640134  0.265745 -0.087371  0.004455 -0.026561   \n",
      "284805  0.800049 -0.163298  0.123205 -0.569159  0.546668  0.108821  0.104533   \n",
      "284806  0.643078  0.376777  0.008797 -0.473649 -0.818267 -0.002415  0.013649   \n",
      "\n",
      "        Amount_Norm  \n",
      "0          0.244964  \n",
      "1         -0.342475  \n",
      "2          1.160686  \n",
      "3          0.140534  \n",
      "4         -0.073403  \n",
      "...             ...  \n",
      "284802    -0.350151  \n",
      "284803    -0.254117  \n",
      "284804    -0.081839  \n",
      "284805    -0.313249  \n",
      "284806     0.514355  \n",
      "\n",
      "[284807 rows x 29 columns]\n",
      "[0 0 0 ... 0 0 0]\n"
     ]
    }
   ],
   "source": [
    "# 对Amount进行数据规范化\n",
    "data['Amount_Norm'] = StandardScaler().fit_transform(data['Amount'].values.reshape(-1, 1))\n",
    "y = np.array(data.Class.tolist())\n",
    "data = data.drop(['Time', 'Class', 'Amount'], axis=1)\n",
    "X = data\n",
    "print(X)\n",
    "print(y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "optional-animal",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAVMAAAEkCAYAAACSbNINAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Il7ecAAAACXBIWXMAAAsTAAALEwEAmpwYAAAaGElEQVR4nO3de7xd853/8df7HEGuHINEzCQULQZB4h4RRd2ZULR0ShOitIZqf/xU6zfp1Gj764yGoI2Hoi51a11K3YKQkoaEurQuvUQokiYViWAq+MwfeyU5PcnZZ+2z1873nHXeT4/1OGt/99rf9d058c53fdf6rqWIwMzM6tOUugFmZmXgMDUzK4DD1MysAA5TM7MCOEzNzArgMDUzK4DDtIuStJ+k2ZJekfSlOus6SdKfJc2TNLKOeiZKOqaetqQk6eeSdk/dDisn+TrTrkdSC/ACcGj280ngkIh4oZP1LQS2A+YCvSNicVFtTUXS9sAmEXFb4qaYAe6ZdlWHA09ExONZ8E0B9q6jvnUj4tWIWFqGIM1sD/xL4jaYLecw7Zq2AV5s9fo/gTsAJP2f7ND/RUkHZmX/LulCSfdI+qukiVn5dyXNzdbnSvpttn6CpKuW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boil57n5jdcXeC1bXwxsnrAtVqCIWAzluVGH1cc908ZbAvTO1vvhP3OzUvL/2I03ixWH9sOAl9M1xcwaxYf5jXcbME3SYOBAYNe0zTGzRvAMqNUgO+u7H/BIRMxN3R4zK57D1MysAB4zNTMrgMPUzKwADlMzswI4TLs5Sf8u6XlJj0h6ILtqoLP1jG71+gc5PrO9pO07u492tplabx211GdWFIdpOZwfEaOAK4HTiqgwIs7Isdn22WLW4/k603JpAd6D5T2yJ4DtImJ/SX2AnwAbAs9GxJeyS7ZuBpqpPHV36rKKJE2NiNHZ+trAVcA/Am8BRwPfBMZk7/9rROxT6z46IqkflfsarA3MiYgvZG+dKWkC8AZwHPARlbvdfxyYDxwTER/m3Y9ZEdwzLYdzJT1CZULAxKxsV2B6ROyfvR4PPJf1YDeStF1WdmdE7A0srVL/eODpiBgJ/AzYJiLOAb4DfCci9ilgH6uyEXAJlckOm0gamJXPjIi9gEXAocDhQK+s7BXg4Br3Y1Y390zL4fyIuLZN2XMR8fNWrz8B7J6NN64LbAxsyoo7Ws2sUv+WVEIUKj3U9tSzj1VZCpwIfAFYjxX3OJiR/XwS2IzK3+Pdst54P+D5GvdjVjf3TMtrSZvXLwI/yA7dv0GlBzcH2Dp7f/sqdb0A7JStf51KwEFlSKEPgCq3TqpnH6syDrgF+CzwTqvy4dnP7ajc6+BF4IZsv2cAv6txP2Z1c5j2HJcDB2bDAV8EXs3Kjsx6dAOqfHYysGO23Y7ANVn5/cARkh4F9qxzH6tyP3AOlfvAQqWnC7CnpIeBgcDtwB1Ubrz9MPBtKgFutlp5OqmZWQHcMzUzK4DD1MysAA5TM7MCOEzNzArgMDUzK4DD1MysAP8L5+6IJhMpMekAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 数据集切分\n",
    "train_x, test_x, train_y, test_y = train_test_split(X, y, test_size=0.1)\n",
    "# 逻辑回归分类\n",
    "clf = LogisticRegression()\n",
    "clf.fit(train_x, train_y)\n",
    "predict_y = clf.predict(test_x)\n",
    "# 计算混淆矩阵，并显示\n",
    "cm = confusion_matrix(test_y, predict_y)\n",
    "plot_confusion_matrix(cm, classes=[0, 1], title = 'Confusion matrix', cmap = plt.cm.Blues)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "fixed-thanksgiving",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAETCAYAAAAs4pGmAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Il7ecAAAACXBIWXMAAAsTAAALEwEAmpwYAAAlKElEQVR4nO3deXzddZ3v8dcnJ0vTrG3TpG26QWnLUguUUhwoWMEyeEeHUVTwKi7ocN11dLzijONwFTcuw+goyHTE0XEBi0txvMAMAtVCQWihFdtC9zVNmyZpkpM9J5/7x++XJk1+WZrmnJOk7+fjkUfO8j3nfM6v6Xmf7/f7+31/5u6IiIj0lpHuAkREZHRSQIiISCQFhIiIRFJAiIhIJAWEiIhEUkDImGRmmemuYTSzQF6665CxTQEhKWdm1uv6D8xslpl9x8yWDvFp/sHM7hri6/2jmb17GHVmmlnsVB83XMOts9dzJMwsH5gH7Byg3XVmdn6P628zs9eZmT4T5ATTcRCSSmZ2DvAfwHXuXm9m5wG/AeYDlwCfcPebez1mD9AaXm0FbgA2A9uBOmCXu3+gR/v7w+frDG+aBUwEXg2vx4Bj7v6WQWr9KHAr0A6UAAXAnh5NzgeudPeNYftfAouBeD9PORl4yN0/M5J19qo57u75ZjYLWOfucyPaZAAvAze7+4vhbf8M7A3fZ727/9+hvqaMX+qmS0q5+04zWwc8YmZ/DnwAyAN+D2QDbmbPA1nufnH4sHOAnwF3E3x4PgG8391Xm9k9wH/3epmvAE3uXmlmC4DvASuBDHdvNrMLgMQQar0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jgHjdc0oGeO0F5NIBDM7BOzodfMs4HPu/nMz207/5xXIdfcrIp7zU0Blrx6IyKilHoRItGO9d2MNexBZ4dWb3P3FqAcOcMayHPR/TsYQ9SBERCSS9mISEZFICggREYmkgBARkUgKCBERiaSAEBGRSAoIERGJ9P8BmkE7BkU9GNEAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 预测样本的置信分数\n",
    "y_score = clf.decision_function(test_x)\n",
    "# 计算准确率，召回率， 阈值， 用于可视化\n",
    "precision, recall, thresholds = precision_recall_curve(test_y, y_score)\n",
    "plot_precision_recall()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "bibliographic-humidity",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZoAAAEFCAYAAADaNiH1AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Il7ecAAAACXBIWXMAAAsTAAALEwEAmpwYAAAfp0lEQVR4nO3dfZhcZZnn8e/PKCrvjTBBQDeLgy+jiELkbQk0jowoigOsE19WVsDJ4AC+zDgLyAwyCOrFIK6iBIK6QUQEXN3BUQhhoFcQ4iQZlBcVBEwUFBkQCIiKxt/8cU5Dpbq6qjrpqupz6ve5rr5SVX3qOXdXSN8859zPc8s2ERERvfK0QQcQERH1lkQTERE9lUQTERE9lUQTERE9lUQTERE9lUQTERE9lUQTtSTpFEmPSbqv4Wv+oOOaKkmLJR096DgiNkQSTdTZp21v2/B1yfoMImmOpHdOc2wz1rD9vNF7STQRnc0B3jngGPppDsP180aPJdHE0JH0QUl3S7pL0hvL154maZGkn0m6U9Kfla9fB3wV2Lu8/HZ++fopkk5pGHOVpDkNj18t6VpJFzQcc4SkOyT9VNJfrmfsqyR9Sd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Gee5OuopN0lYUPYCO7FNc47qKz4VjKBrmvaFPsUF38Z0AfMb2w/0KqkE38d1s++fl4x9S/GLqh25ieyWwyPZ9wBcpmiL2S7f/Np4G7G/72n4FVuomvo8AR9s+leLv9ogNPelM+uXVbyt5atq4C7BqPY/plUGeu5OOsZX/R34pcKLt1f0LDeguvuMlHV4+3ZLi/8r7pZu/29cAx0gao2ju99n+hAZ0F9+FknaRNAs4BPjeDIrtTmDH8vFcoJ///XX773Ye7Xec75Vu4tsY2Ln8u90D2PDFlraH8gvYnOIfx1nAD8oP/bQOx2wxk+JrOHZsBn5276aYco+VX/NnWHwjwFKK9hHnUC5eninxVeDv92XAzcAtwOkzLLbNgMvKv9sbge1nUnzlcR8BDu3n3+sUPr/dgdsoZj9LgU039LxDvTNAWbV1APAtF9Ps9TpmkPENykyODRLfhprJ8c3k2CDxtTznMCeaiIjovWG+RxMREX2QRBMRET2VRBMRET2VRBMRET2VRBMRET31n1rBWtCztRkwAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 显示模型中特征重要性\n",
    "coeffs = clf.coef_\n",
    "df_co = pd.DataFrame(np.transpose(abs(coeffs)), columns=[\"coef_\"])\n",
    "# 下标设置为Feature Name\n",
    "df_co.index = data.columns\n",
    "df_co.sort_values(\"coef_\", ascending=True, inplace=True)\n",
    "df_co.coef_.plot(kind=\"barh\")\n",
    "plt.title(\"Feature Importance\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "desirable-insider",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "work2",
   "language": "python",
   "name": "work"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
